{% extends 'news/base.html' %}

{% block style %}
    {% load static %}
{#    <link rel="stylesheet" href="{% static 'news/css/pwd.css' %}">#}
    <link rel="stylesheet" href="{% static 'news/css/people.css'%}">
    <link rel="stylesheet" href="{% static 'news/css/xxtz.css'%}">
{% endblock %}


{% block c_right %}
    <form action="{% url 'news:upload' %}" method="post" enctype="multipart/form-data">
        {% csrf_token %}
        <div id="peo_1">
            <div class="peo_2">
                <div></div><span>消息通知</span>


                {% load poll_extras %}
                <div class="record">
                    <ul class="record-ul message-tz">
                        {% for article in author.articles.all %}
                            {% for comments in article.comments.all %}
                                <li class="record-li">
                                    <span class="record-span1">{{ comments.author.nick_name }}评论了您的"{{ article.title }}"</span>
                                    <span class="record-span3">{{ comments.send_time|cut }}</span>
                                </li>
                            {% endfor %}


                        {% endfor %}
                    </ul>
                </div>


                {# 分页#}
                <nav aria-label="Page navigation">
                    <ul class="pagination pagination-lg">
                        {% if contacts.has_previous %}
                            <li style="float: left">
                                <a href="?page={{ contacts.previous_page_number }}" aria-label="Previous" target="_parent" >
                                    <span aria-hidden="true" style="position: absolute; margin: 100px 0 0 290px;">&laquo;</span>
                                </a>
                            </li>
                        {% endif %}

                        <li style="float: left;margin-left:300px ;"  class="active">
                            {% for pg in contacts.paginator.page_range %}
                                <a href="{% url 'news:jifen' %}?page={{ pg }}" target="_parent" class="box" style="display: inline-block; width: 20px; height: 20px;margin: 100px 0 0 2px; border: 1px solid black;text-align: center;line-height: 20px;">{{ pg }}</a>
                            {% endfor %}
                        </li>

                        {% if contacts.has_next %}
                            <li>
                                <a href="?page={{ contacts.next_page_number }}" aria-label="Next" target="_parent">
                                    <span aria-hidden="true" style="float: left; margin: 200px 0 0 10px; ">&raquo;</span>
                                </a>
                            </li>
                        {% endif %}
                    </ul>
                </nav>
            </div>


        </div>

    </form>

{% endblock %}


<script>
    $('.glyphicon').click(function () {
        $('.level-bot-p').toggle();
        $(this).toggleClass('glyphicon-triangle-bottom');
        $(this).toggleClass('glyphicon-triangle-right');
    });
</script>